default: main

main: main.o
	g++ bin/main.o bin/request.o bin/monitor.o bin/monitorsstf.o bin/monitorE.o bin/logger.o -o main.prog -lpthread

main.o: request.o monitor.o monitorsstf.o logger.o
	g++ -c src/main.cpp -o bin/main.o
   
monitortest: monitortest.o
	g++ bin/monitortest.o bin/monitor.o bin/request.o -o monitortest.prog
   
monitortest.o: request.o monitor.o
	g++ -c src/monitortest.cpp -o bin/monitortest.o
   
monitor.o: request.o logger.o
	g++ -c src/monitor.cpp -o bin/monitor.o -lpthread 

monitorsstf.o: monitor.o logger.o request.o
	g++ -c src/monitorsstf.cpp -o bin/monitorsstf.o -lpthread

monitorE.o: monitor.o logger.o request.o
	g++ -c src/monitorE.cpp -o bin/monitorE.o -lpthread

requesttest: requesttest.o
	g++ bin/requesttest.o bin/request.o -o requesttest.prog
	
requesttest.o: request.o
		g++ -c src/requesttest.cpp -o bin/requesttest.o

request.o: logger.o
	g++ -c src/request.cpp -o bin/request.o
	
logger.o:
	g++ -c src/logger.cpp -o bin/logger.o

clean:
	rm bin/*.o
	rm *.prog
